package com.quickcode.threadlocal.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * Created by 张波 on 2019/10/23.
 */
@Configuration
public class InterceptBean extends WebMvcConfigurationSupport {

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ThreadInterceptor()).addPathPatterns("/**");
    }
}
